package com.ztsoft.user.pojo.entity.dynamic;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.ztsoft.user.pojo.entity.user.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 表单数据
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_form_data")
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class FormData extends BaseEntity {
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;// '主键'
    //对应明细id
    private String formDetailId;
    //值
    private String valueStr;

    public FormData(String formDetailId, String valueStr) {
        this.formDetailId = formDetailId;
        this.valueStr = valueStr;
    }

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 修改时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;
    /**
     * 创建id
     */
    private String createId;
    /**
     * 修改id
     */
    private String modifyId;
    /**
     * 是否删除
     */
    private Integer isDelete;

}